<template>
	<view class="uni_box home">
		<navbar title='资料下载'>
			<view class="hright" slot="right" @click="botshow=true">
				<text>CFA</text>
				<image class="xiaicon" src="@/pages_subject/static/img/xiaicon.png" mode="" />
			</view>
		</navbar>
		<view class="content">
			<u-sticky :offset-top="BarHeight()" h5-nav-height="44">
				<view class="tabview">
					<u-tabs :list="tablist" :is-scroll="true" :current="tabcurrent" @change="tabchange" active-color="#E8433A" inactive-color="#CCCCCC"></u-tabs>
				</view>
				<view class="tabtwo">
					<scroll-view scroll-x class="twoscol">
						<view class="solitem sactive">
							Level  II
						</view>
						<view class="solitem">
							Level  II
						</view>
						<view class="solitem">
							Level  II
						</view>
						<view class="solitem">
							Level  II
						</view>
						<view class="solitem">
							Level  II
						</view>
					</scroll-view>
				</view>
			</u-sticky>
			<view class="list">
				<view class="zilist" v-for="(item,index) in 20" :key="index">
					<image class="ziimg" src="@/pages_subject/static/img/tous.png" mode="" />
					<view class="zinav">
						<view class="zione">
							<text class="zimian">免费</text>
							<text class="ziname txt">2022年CFA一级模拟题</text>
						</view>
						<view class="zitwo">
							<text class="xianame">4.0M | 下载数：85</text>
						</view>
					</view>
					<view class="xiazai">下载资料包</view>
				</view>
			</view>
			

			<!-- 底部弹出 -->
			<view class="botpop">
				<u-popup v-model="botshow" mode="bottom" @close="botshow=false">
					<view class="popview">
						<view class="shaiview">
							<view class="shaiitem">
								<text class="shaitit">科目</text>
								<view class="shailist">
									<view class="shais sactive">全部</view>
									<view class="shais">CFA</view>
									<view class="shais">FRM</view>
									<view class="shais">全部</view>
									<view class="shais">CFA</view>
									<view class="shais">FRM</view>
									<view class="shais">全部</view>
									<view class="shais">CFA</view>
									<view class="shais">FRM</view>
								</view>
							</view>
							<view class="shaiitem">
								<text class="shaitit">级别</text>
								<view class="shailist">
									<view class="shais">全部</view>
									<view class="shais">CFA</view>
									<view class="shais">FRM</view>
									<view class="shais">全部</view>
									<view class="shais">CFA</view>
									<view class="shais">FRM</view>
									<view class="shais">全部</view>
									<view class="shais">CFA</view>
									<view class="shais">FRM</view>
								</view>
							</view>
							<view class="chongview">
								<view class="czhi" @click="botshow=false">重置</view>
								<view class="que" @click="botshow=false">确认</view>
							</view>
						</view>
					</view>
				</u-popup>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				swlist: [{
						image: '/static/banner.png',
					},
					{
						image: '/static/banner.png',
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
					}
				],
				tablist:[
					{
						name: '全部'
					}, {
						name: 'CFA'
					}, {
						name: 'FRM'
					},{
						name:'ACCA'
					}, {
						name: 'CFA'
					}, {
						name: 'FRM'
					},{
						name:'ACCA'
					}
				],
				tabcurrent:0,
				isshai:false,
				botshow:false
			}
		},
		onLoad() {
			console.log(this.Themecolor)
			
		},
		onShow() {
		},
		methods: {
			change(index) {
				this.current = index;
			},
			tabchange(e){
				this.tabcurrent = e
			},
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #F6F7FB;
	}
	.content{
		background-color: #F6F7FB;
		// padding-bottom: 150rpx;
		.tabview{
			padding: 20rpx;
			background-color: #fff;
			z-index: 100;
			// margin-top:  calc(var(--window-top));
		}
		.tabtwo{
			border-top: 1rpx solid #EEEEEE;
			// margin: 20rpx 0;
			padding:  20rpx;
			background-color: #fff;
			.twoscol{
				width: 100%;
				white-space: nowrap;
				.solitem{
					display: inline-block;
					padding: 16rpx 50rpx;
					margin-right: 20rpx;
					background: #F8F8F8;
					border-radius: 32rpx;

				}
				.sactive{
					background: #FFF0F0;
					color: #FA4E4E;
				}
			}
		}
		.xuanview{
			height: 88rpx;
			position: relative;
			display: flex;
			flex-direction: row;
			border-top: 1rpx solid #eee;
			background-color: #fff;
			z-index: 100;
			.xuanitem{
				width: 50%;
				height: 100%;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: center;
				.qtit{
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #111111;
				}
				.xia{
					width: 11rpx;
					height: 6rpx;
					margin-left: 10rpx;
				}
				.xias{
					width: 11rpx;
					height: 6rpx;
					margin-left: 10rpx;
					display: none;
				}
			}
			.xactive{
				.qtit{
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #FA4E4E;
					
				}
				.xia{
					width: 11rpx;
					height: 6rpx;
					margin-left: 10rpx;
					display: none;
				}
				.xias{
					width: 11rpx;
					height: 6rpx;
					margin-left: 10rpx;
					display: inline-block;
				}
			}
		}
		

		.list{
			padding:  30rpx;
		}
		.zilist{
			padding: 30rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			display: flex;
			flex-direction: row;
			align-items: center;
			margin-bottom: 30rpx;
			.ziimg{
				width: 68rpx;
				height: 80rpx;
				margin-right: 20rpx;
			}
			.zinav{
				width: 62%;
				display: flex;
				flex-direction: column;
				.zione{
					display: flex;
					flex-direction: row;
					align-items: center;
					.zimian{
						width: 50rpx;
						height: 26rpx;
						background: #EDFCF1;
						border-radius: 4rpx;
						border: 1px solid #B8E7C3;
						display: flex;
						align-items: center;
						justify-content: center;
						font-family: PingFang SC;
						font-weight: 400;
						font-size: 20rpx;
						color: #46C564;
						margin-right: 10rpx;
					}
					.ziname{
						max-width: 85%;
						display: inline-block;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 28rpx;
						color: #111111;
					}
				}
				.zitwo{
					display: flex;
					flex-direction: row;
					align-items: center;
					margin-top: 15rpx;
					.xianame{
						font-family: PingFang SC;
						font-weight: 400;
						font-size: 22rpx;
						color: #999999;
					}
				}
			}
			.xiazai{
				margin-left: auto;
				width: 130rpx;
				height: 52rpx;
				background: linear-gradient(-90deg, #FA4E4E, #FD894F);
				border-radius: 26rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC;
				font-weight: 400;
				font-size: 20rpx;
				color: #FFFFFF;
			}

		}
		.tilist-jiaocai{
		// margin-top: 40rpx;
		.tiitem-two{
			display: flex;
			flex-direction: row;
			background: #FFFFFF;
			border-radius: 10rpx;
			// padding: 20rpx;
			padding: 0rpx 0 39rpx;
			margin-bottom: 39rpx;
			border-bottom: 1rpx solid #eee;
			.itemimg{
				width: 275rpx;
				height: 179rpx;
				background: #F8F8F8;
				border-radius: 10rpx;
				margin-right: 20rpx;
			}
			.itembot{
				flex: 1;
				display: flex;
				flex-direction: column;
				.tbiao{
					max-width: 100%;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #111111;
					display: inline-block;
				}
				.timiao{
					font-weight: 500;
					font-size: 20rpx;
					color: #999999;
					margin-top: 20rpx;
					margin-bottom: 10rpx;
					display: inline-block;
				}

				.linview{
					display: flex;
					margin-top: auto;
					flex-direction: row;
					align-items: center;
					.xue{
						padding: 7rpx 15rpx;
						background: #999999;
						border-radius: 30rpx;
						font-weight: 500;
						font-size: 24rpx;
						color: #FFFFFF;
					}
					.xues{
						background: linear-gradient(-90deg, #FA4E4E, #FD894F);
						color: #fff;
					}
					.jine{
						font-family: DIN;
						font-weight: bold;
						font-size: 20rpx;
						color: #FA4E4E;
						.jinnum{
							font-size: 32rpx;
						}
						
					}
					.mian{
						margin-left: auto;
						font-weight: 500;
						font-size: 20rpx;
						color: #CCCCCC;
					}
				}
			}
		}
	}
	}
	.hright{
		position: absolute;
		right: 10px;
		display: flex;
		flex-direction: row;
		align-items: center;
		.xiaicon{
			width: 15rpx;
			height: 8rpx;
		}
		text{
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #060606;
			display: inline-block;
			margin-right: 15rpx;
		}
	}
	// 底部弹窗
	.botpop{
		/deep/.u-drawer-bottom{
			background-color: transparent;
		}
		.popview{
			padding: 30rpx 0;
			background-color: #fff;
			border-radius: 40rpx 40rpx 0 0;
		}
		.shaiview{
			padding: 25rpx 30rpx;
			// background-color: #fff;
			display: flex;
			flex-direction: column;
			position: relative;
    		width: 100%;
			// z-index: 100;
			.shaiitem{
				margin-bottom: 20rpx;
				.shaitit{
					display: block;
					margin-bottom: 24rpx;
					font-family: PingFangSC;
					font-weight: bold;
					font-size: 24rpx;
					color: #333333;
				}
				.shailist{
					display: flex;
					flex-direction: row;
					flex-wrap: wrap;
					.shais{
						width: 31%;
						margin-right: 2%;
						height: 64rpx;
						background: #F8F8F8;
						border-radius: 32rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						margin-bottom: 25rpx;
						font-weight: 500;
						font-size: 22rpx;
						color: #333333;
					}
					.sactive{
						background: #FFF0F0;
						color: #FA4E4E;
					}
				}
			}
			.shaiitem:last-child{
				margin-bottom: 0 !important;
			}
			
			.chongview{
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: space-between;
				.czhi{
					width: 48%;
					height: 80rpx;
					background: #F8F8F8;
					border-radius: 40rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #111111;
				}
				.que{
					width: 48%;
					height: 80rpx;
					background: linear-gradient(-90deg, #FA4E4E, #FD894F);
					border-radius: 40rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #fff;
				}
			}
		}

	}
</style>
